package com.heima.wemedia.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.media.dtos.WmNewsDTO;
import com.heima.model.wmmedia.dtos.NewsAuthDTO;
import com.heima.model.wmmedia.dtos.WmNewsPageReqDTO;
import com.heima.model.wmmedia.pojos.WmNews;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

public interface WmNewsService extends IService<WmNews> {

    //分页带条件查询自媒体文章列表
    ResponseResult listWmNews(WmNewsPageReqDTO dto);

    //保存或修改文章
    ResponseResult submitNews(WmNewsDTO dto);

    //根据id查询文章
    ResponseResult findWmNewsById(Integer id);

    //根据id删除自媒体文章
    ResponseResult deleteNews(Integer id);

    //自媒体文章-上架、下架
    ResponseResult downOrUp(WmNewsDTO dto);

    //分页查询文章和作者列表
    ResponseResult findList(NewsAuthDTO dto);

    //根据文章id查询文章和作者详情
    ResponseResult findWmNewsVo(Integer id);

    ResponseResult updateWmNewsStatus(NewsAuthDTO dto, short i);

    public void saveMaterialNews(Integer newsId, List<String> newMaterialUrls, short type);
}
